package com.impl;

import com.service.AppService;
import org.springframework.stereotype.Service;

@Service
public class AppServiceImpl implements AppService {

    @Override
    public void add(String name, int number) {
        System.out.println("添加商品: " + name + ", 数量: " + number);
    }

    @Override
    public void delete(String name) {
        System.out.println("删除商品: " + name);
    }

    @Override
    public int find(String name) {
        // 模拟查询结果
        int count = (int)(Math.random() * 10) + 1;
        System.out.println("查询商品: " + name + " 的数量");
        return count;
    }
}
